package com.mes.dao.tdd;

import com.mes.entity.tdd.Department;
import com.mes.entity.tdd.DepartmentExample;
import com.mes.entity.tdd.tj.Tpage;

import java.util.List;
import org.apache.ibatis.annotations.Param;
/**
 * 
 *@ClassName: DepartmentMapper 
 *@Description: 部门
 *@Author tdd
 *@Date 2018-6-6 上午9:24:33 
 *@version 1.0
 */
public interface DepartmentMapper {
    int countByExample(DepartmentExample example);

    int deleteByExample(DepartmentExample example);

    int deleteByPrimaryKey(Long departmentid);

    int insert(Department record);

    int insertSelective(Department record);

    List<Department> selectByExample(DepartmentExample example);

    Department selectByPrimaryKey(Long departmentid);

    int updateByExampleSelective(@Param("record") Department record, @Param("example") DepartmentExample example);

    int updateByExample(@Param("record") Department record, @Param("example") DepartmentExample example);

    int updateByPrimaryKeySelective(Department record);

    int updateByPrimaryKey(Department record);
  	/**
  	 * 假删除
  	 * @param department
	 * @return 影响行数
  	 */
	int delete(Department department);

	/**
	 * 修改
	 * @param department
	 * @return 影响行数
	 */
	int edit(Department department);

	/**
	 * 添加返id
	 * @param department 部门
	 * @return  部门id
	 */
	Long add(Department department);

	/**
	 * 分页条数
	 * @param pageBean 分页+条件
	 * @return 条数
	 */
	int total(Tpage pageBean);

	/**
	 * 分页查询
	 * @param pageBean 分页+条件
	 * @return  部门集合
	 */
	List<Department> list(Tpage pageBean);
	/**
	 * 查询
	 * @param pageBean 条件
	 * @return  部门集合
	 */
	List<Department> all(Tpage pageBean);
}